__author__ = 'yejinlei_cn@qq.com'

import copy

class pyPrototype:
    @staticmethod
    def cloneshallow(obj):
        return copy.copy(obj)

    @staticmethod
    def clonedeep(obj):
        return copy.deepcopy(obj)

#test
if __name__ == '__main__':
    l = [[1],[3,4]]
    l1 = pyPrototype.cloneshallow(l)
    l2 = pyPrototype.cloneshallow(l)
    l[0].append(2)
    print(l)
    print(l1)
    print(l2)

    l = [[1],[3,4]]
    l1 = pyPrototype.clonedeep(l)
    l2 = pyPrototype.clonedeep(l)
    l[0].append(2)
    print(l)
    print(l1)
    print(l2)